package com.nexus.all.dto;

import com.nexus.all.model.NoteContent;
import com.nexus.bean.annotation.valid.AddGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.NotBlank;

/**
 * @ClassName: NoteDTO
 * @Author: ZZYR
 * @Date: 2024/2/26  9:21
 * @Version 1.0.0
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@ApiModel("笔记发布对象入参")
public class NoteDTO {

    /**
     * 标题
     */
    @NotBlank(message = "笔记标题不能为空", groups = AddGroup.class)
    @ApiModelProperty(value = "笔记标题", required = true)
    private String title;

    /**
     * 发布用户id
     */
    @ApiModelProperty(value = "发布用户id", hidden = true)
    private Long userId;

    /**
     * 笔记封面图片url
     */
    @ApiModelProperty("笔记封面图片url")
    private String coverUrl;

    /**
     * 笔记关联内容id
     */
    @ApiModelProperty(value = "笔记关联内容id", hidden = true)
    private Long contentId;

    /**
     * 笔记内容
     */
    @ApiModelProperty(value = "笔记内容", required = true)
    private NoteContentDTO noteContentDTO;
}
